<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	<?php 
	$cs = Yii::app()->getClientScript();
	$cs->registerScriptFile(Yii::app()->theme->baseUrl.'/js/jquery.flexnav.js');
	$cs->registerCssFile(Yii::app()->theme->baseUrl.'/css/main.css');
	$cs->registerCssFile(Yii::app()->theme->baseUrl.'/css/flexnav.css');
	?>
</head>
<body>
<div id="main">
	<div id="main-wrapper">
	    <!-- TOP -->
	    <div id="header">
	    	<div class="wrr-content">
				<a href="/"><img style="background: #fff; margin-top: 5px;" width="250" alt="" src="<?php echo Yii::app()->theme->baseUrl; ?>/images/logo.jpg"></a>
	        </div>
	  	</div>
		<div id="menu">
			<div class="wrr-menu">
			<?php $this->widget('application.widgets.Menu.Menu', array('_item_active'=>$this->activemenu,'_gmid'=>1));?>
			</div>
		</div>
			<?php echo $this->clips['slide'];?>
		<!-- TOP -->
		
	    <div id="body">
			<!-- CENTER -->
			<?php echo $content;?>
			<!-- CENTER -->
		</div>
		<div class="clear"></div>
		<div id="bost1">
			<div class="wrr-content">
				<div class="bost-box">
				<div class="bost-box-wrr">
					<h3><span>Newsletter</span></h3>
					<div>
						<div>Hãy tham gia chương trình newsletter để bạn luôn có thông tin mới nhất.</div>
						<div>
							<input type="text" name="newsletter" onfocus="if(this.value=='E-mail') this.value=''" onblur="if(this.value=='') this.value='E-mail'" value="E-mail" />
							<input type="submit" name="reg" value="Đăng ký" />
						</div>
					</div>
				</div>
				</div>
				<div class="bost-box">
				<div class="bost-box-wrr">
					<h3><span>LIÊN HỆ</span></h3>
					<div>
						<div>Bạn hãy liên hệ trực tiếp với chúng tôi</div>
						<div>
							<ul class="contact-list">
							<li class="phone"><strong>Hot line: </strong><span>0902 807 007</span></li>
							<li class="email"><strong>Email: info@thongtinquanly.com</strong></li>
							</ul>
						</div>
					</div>
				</div>
				</div>
				<div class="bost-box">
				<div class="bost-box-wrr">
					<h3><span>KẾT NỐI THONGTINQUANLY</span></h3>
					<div>
						<div>Kết nối với Thongtinquanly.vn, luôn được chia sẻ thông tin.</div>
						<div>
							<ul class="social-list">
							<li class="twitter"><a title="Twitter" href="#">Twitter</a></li>
							<li class="facebook"><a title="Facebook" href="#">Facebook</a></li>
							<li class="google-plus"><a title="Google plus" href="#">Google plus</a></li>
							<li class="feed"><a title="Feed" href="#">Feed</a></li>
							<li class="vimeo"><a title="Vimeo" href="#">Vimeo</a></li>
							</ul>
						</div>
					</div>
				</div>
				</div>
			</div>
		</div>
		<?php 
			$parent = array(4,5,6,7);
		?>
		<div id="bost2">
		<div class="wrr-content">
			<?php foreach ($parent as $value):?>
			<?php 
			$menuGroup = FrontendMenusModel::model()->findByPk($value);
			if($menuGroup):
			$menus = FrontendMenuItemsModel::model()->findAll('TRUE AND menu_group=:g AND published=1 ORDER BY position ASC', array(':g'=>$value));
			if($menus):
			?>
			<div class="bost-box-f2">
				<div class="bost-box-wrr">
					<h3><span><?php echo $menuGroup->name;?></span></h3>
					<div>
						<div>
							<ul class="menu">
							<?php foreach ($menus as $item):
							if($item->menutypes==2){
								//page
								$link = Yii::app()->controller->createUrlPage($item->content_id);
							}elseif($item->menutypes==3){
								//home
								$link = Yii::app()->controller->createUrlHome();
							}elseif($item->menutypes==4){
								$link = $item->url;
							}
							?>
							<li class="item-<?php echo $item->id;?>"><a href="<?php echo $link;?>"><?php echo $item->name;?></a></li>
							<?php endforeach;?>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<?php endif;?>
			<?php endif;?>
			<?php endforeach;?>
		</div>
		</div>
		<div id="footer">
			<div class="wrr-footer">
				<p>COPYRIGHT&copy; 2013 BY THONGTINQUANLY COMPANY</p>
				<p>Website: <a href="http://thongtinquanly.vn">www.thongtinquanly.vn</a> | Email: <a href="info@thongtinquanly.com">info@thongtinquanly.com</a></p>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">$(".flexnav").flexNav();</script>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-43064502-1', 'thongtinquanly.vn');
  ga('send', 'pageview');

</script>
</body>
</html>
